package cn.wolfcode.wolf2w.query;

import cn.wolfcode.wolf2w.domain.TravelCondition;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class TravelQueryObject extends QueryObject {
    private String destId;
    // 出行时间
    private int dayType = -1;
    // 最低消费
    private int perExpendType = -1;
    // 排序
    private int orderType;

    // 前端会传一个dayType , 把 dayType 当做DAY_TYPE 的key ,查询到TravelCondition对象
    // 比如说datType 是2 , 查询到的结果是[4,7]
    public TravelCondition getDay(){
        return TravelCondition.DAY_MAP.get(dayType);
    }

    // perExpendType , 把 perExpendType preExpend_MAP 的key ,查询到TravelCondition对象
    // perExpendType 是2 , 查询到的结果是(1000 ,6000)
    public TravelCondition getPerExpend(){
        return TravelCondition.preExpend_MAP.get(perExpendType);
    }

}
